//
//  LetterListCell.m
//  DirectProDuct
//
//  Created by hl on 16/1/22.
//  Copyright (c) 2016年 ping. All rights reserved.
//

#import "LetterListCell.h"
#define Font 12.0f
@implementation LetterListCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createdSubView];
    }
    return self;
}
-(void)createdSubView{
    float labW = (KScreenWidth - 50 * _kscW)/4;
    self.peopleLab = [self createdLabWithIndex:0 withWidth:labW];
    self.topicLab = [self createdLabWithIndex:1 withWidth:labW];
    self.timeLab = [self createdLabWithIndex:2 withWidth:labW];
    self.sizeLab = [self createdLabWithIndex:3 withWidth:labW];
    
    self.deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.sizeLab.right + 15 * _kscW, 5 * _kscH, 20 * _kscW, 20 * _kscH)];
    [self.deleteBtn setImage:[UIImage imageNamed:@"lijitong(1)"] forState:UIControlStateNormal];
    [self.contentView addSubview:self.deleteBtn];
    
    UILabel *lineLab = [[UILabel alloc] initWithFrame:CGRectMake(15 *_kscW, 29 * _kscH, KScreenWidth - 15 * _kscW, 1 *_kscH)];
    lineLab.backgroundColor = XiaHuaXianCOLOR;
    [self.contentView addSubview:lineLab];


}
-(UILabel *)createdLabWithIndex:(int)index withWidth:(float)width{
    UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(width * index, 0, width, 30 * _kscH)];
    lab.textAlignment = NSTextAlignmentCenter;
    lab.font = [UIFont systemFontOfSize:Font];
    [self.contentView addSubview:lab];
    return lab;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
